<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>摄影用品超市</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <!--设置标题图标-->
    <link rel="shortcut icon" href="http://www.shumasheying.org.cn/themes/index/public/assets/images/logo.png" type="image/x-icon" />

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        body{font: 14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; background-color: #F4F4F4;}
        /*头部样式代码*/
        header{border-bottom: 2px solid #FF6700;padding-bottom: 20px;}
        .navbar-default{}
        .navbar{border: 0;background-color: #F4F4F4;}
        .container-fluid{position: relative;top: 24px;}
        .h-img-01{width: 180px;height: 56px; position: relative;bottom: 20px;}
        /*搜索框样式*/
        header form>input{background-color: #F4F4F4;height: 30px;border: 0;padding: 10px 20px;border-radius: 5px;margin-top: 10px;border: 1px solid #b0b0b0;}
        header form>button{background-color: #F4F4F4;border: 0;position: relative;right: 40px;}
        /*体部样式代码*/
        .list-group-item{background-color: white;color: #FF6700;border: 0;}
        .list-head{background-color: #ffc600;color: black;}
        .container{width: 1280px;padding: 0;}
        .img-s1{transition-duration: 2s;}
        .img-s1:hover{transform: scale(1.2);}
        .div-s1{width: 550px;height: 240px;padding: 30px;position: relative; }
        .div-s2{width:300px;height: 180px;margin: 30px;overflow: hidden; }
        .h3-s1{margin: 15px 0 20px 0;font-size:20px;font-weight: normal; }
        .p-s1{font-size: 15px;}
        .p-s2{display: block;width: 490px; margin-top: 0;position: absolute;bottom: 30px;}
        .a-s1{color:#424242; }
        .a-s1:hover{color:#424242; }
        /*脚部样式代码*/
        .f-div-01{text-align: center;color: #424242;padding: 30px 0;border-top: 2px solid #FF6700;}

    </style>
</head>
<body>
<header>
    <!--导航条开始-->
    <nav class="container navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">
                    <img class="h-img-01" alt="Brand" src="http://www.shumasheying.org.cn/themes/index/public/assets/images/logo.png">
                </a>
            </div>
            <!--分类开始-->
            <ul class="nav navbar-nav">
                <li v-for="c in c_arr"><a href="">{{c.name}}</a></li>
                <li>
                    <form action="">
                        <input type="text" placeholder="Search">
                        <button>
                            <i class="fa fa-search"></i>
                        </button>
                    </form>
                </li>
            </ul>
            <!--分类结束-->
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/shopping-cart.html">我的购物车</a></li>
                <li><a href="/commodity-management.html">管理商品</a></li>
            </ul>
        </div>
    </nav>
    <!--导航条结束-->
</header>
<section>
    <div class="row" style="padding: 30px 0;">
        <div class="container">
            <div class="col-md-9">
                <a v-for="c in c_arr" href="" class="a-s1">
                    <div style="background-color: white;margin-bottom: 20px;overflow: hidden;">
                        <div class="pull-left div-s2">
                            <img class="img-s1 img-responsive"  :src="c.url" alt="">
                        </div>
                        <div class="pull-left div-s1">
                            <h3 class="h3-s1">{{c.title}}</h3>
                            <p>{{c.intro}}</p>
                            <p class="p-s1">{{c.price}}</p>
                            <p class="p-s1">{{c.salt}}</p>
                            <p class="p-s2">
                                <span>{{c.author}}</span>
                                <span class="pull-right">{{c.time}}</span>
                            </p>
                        </div>
                    </div>
                </a>
            </div>
            <div class="col-md-3">
                <!--销量排行榜开始-->
                <ul class="list-group">
                    <li class="list-group-item list-head">
                        <h4>
                            <i class="fa fa-eye">销量排行前10名</i>
                        </h4>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                    <li class="list-group-item">
                        <div class="media">
                            <div class="media-left">
                                <a href="#">
                                    <img style="width: 64px;height:50px" class="media-object" src="http://www.shumasheying.org.cn/upload/portal/20210916/88ee6185129a0833ef3063396774e0e5.jpg" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading">这是标题</h4>
                                这里是详情
                            </div>
                        </div>
                    </li>
                </ul>
                <!--销量排行榜开始-->
            </div>
        </div>
    </div>
</section>
<footer>
    <div class="f-div-01">版权所有 Copyright © 2019 北京天之星文化传媒中心 All Rights Reserved 备案序号：京ICP备13014113号-4</div>
</footer>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<!--引入vue框架-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!--引入axios框架(实现异步请求):备用地址-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>-->
<!--引入axios框架(实现异步请求)-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    let header_vm = new Vue({
        el: "header",
        data: {
            c_arr: [],
        },
        created:function () {
            axios.get("/category/select").then(function (response) {
                header_vm.c_arr = response.data;
            })
        }
    })
</script>
<script>
    let section_vm = new Vue({
        el: "section",
        data: {
            c_arr: [],
        },
        created:function () {
            axios.get("/category/select").then(function (response) {
            })
            axios.get("/commodity/selectC2").then(function (response) {
                section_vm.c_arr = response.data;
            })
        }
    })
</script>
</body>
</html>